<?xml version="1.0" encoding="UTF-8"?>
<!--
*************************************************************************
* The contents of this file are subject to the Openbravo  Public  License
* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
* Version 1.1  with a permitted attribution clause; you may not  use this
* file except in compliance with the License. You  may  obtain  a copy of
* the License at http://www.openbravo.com/legal/license.html 
* Software distributed under the License  is  distributed  on  an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific  language  governing  rights  and  limitations
* under the License. 
* The Original Code is Openbravo ERP. 
* The Initial Developer of the Original Code is Openbravo SL 
* All portions are Copyright (C) 2001-2006 Openbravo SL 
* All Rights Reserved. 
* Contributor(s):  ______________________________________.
************************************************************************
-->
<REPORT>
  <template file="ReportGeneralLedger.html"/>
  <PARAMETER id="paramToolBar" name="toolbar" default=""/>
  <PARAMETER id="fieldCalendar" name="calendar" attribute="src" replace="es" default="en"/>
  <PARAMETER id="paramDirection" name="direction" default=""/>
  <PARAMETER id="paramLanguage" name="paramLanguage" attribute="value"/>
  <PARAMETER id="paramDateFrom" name="dateFrom" attribute="value"/>
	<PARAMETER id="paramDateFrom" name="dateFromdisplayFormat" attribute="displayformat" replace="xx"/>
	<PARAMETER id="paramDateFrom" name="dateFromsaveFormat" attribute="saveformat" replace="yy"/>
  <PARAMETER id="paramDateTo" name="dateTo" attribute="value"/>
	<PARAMETER id="paramDateTo" name="dateTodisplayFormat" attribute="displayformat" replace="xx"/>
	<PARAMETER id="paramDateTo" name="dateTosaveFormat" attribute="saveformat" replace="yy"/>
  <PARAMETER id="paramC_ELEMENTVALUE_IDFROM" name="cElementValueFrom" default=""/>
  <PARAMETER id="paramC_ELEMENTVALUE_IDTO" name="cElementValueTo" default=""/>
  <PARAMETER id="paramAD_ORGID" name="adOrgId"/>
  <PARAMETER id="paramC_ACCTSCHEMA_ID" name="cAcctschemaId"/>
  <PARAMETER id="paramAmtFrom" name="amtFrom" attribute="value"/>
  <PARAMETER id="paramAmtTo" name="amtTo" attribute="value"/>

  <PARAMETER id="parameterAll" name="all" default="1"/>
  <PARAMETER id="paramAll" name="paramAll0" boolean="checked" withId="parameterAll" default="1"/>

  <PARAMETER id="parameterHide" name="all" default="1"/>
  <PARAMETER id="paramHideMatched" name="paramHide0" boolean="checked" withId="parameterHide" default="0"/>
  <PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
  <PARAMETER id="tdleftTabs" name="leftTabs" default=""/>
  <PARAMETER id="paramParentTabContainer" name="parentTabContainer" default=" "/>
  <PARAMETER id="paramMainTabContainer" name="mainTabContainer" default=" "/>
  <PARAMETER id="paramChildTabContainer" name="childTabContainer" default=" "/>
  <PARAMETER id="tdtopButtons" name="navigationBar" default=""/>
  <PARAMETER id="keyMap" name="keyMap" default=""/>
  <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
  <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
  <PARAMETER id="messageBoxIDMessage" name="messageMessage" default=""/>

  <PARAMETER id="param2" name="param2" default="2"/>

  <structure name="structure1">
    <FIELD id="fieldRownum1">rownum</FIELD>
    <FUNCTION id="funcEvenOddRow1xx" name="MODULE" arg1="fieldRownum1" arg2="param2" format="integerEdition" attribute="class" replace="yy"/>
    <FIELD id="fieldValue">value</FIELD>
    <FIELD id="fieldDateacct">dateacct</FIELD>
    <FIELD id="fieldName">name</FIELD>
    <FIELD id="fieldDescription">description</FIELD>
    <FIELD id="fieldAmtacctdr" format="euroInform">amtacctdr</FIELD>
    <FIELD id="fieldAmtacctcr" format="euroInform">amtacctcr</FIELD>
    <FIELD id="fieldTotal" format="euroInform">total</FIELD>
    <FIELD id="fieldSaldo" format="euroInform">saldo</FIELD>
    <FIELD id="fieldId" attribute="onclick" replace="xx">factAcctGroupId</FIELD>
    <FUNCTION id="functionSumLine" name="SUM" attribute="value" format="euroInform">total</FUNCTION>
    <FUNCTION id="functionSumLine2" name="ADD" arg1="functionSumLine" arg2="fieldSaldo" format="euroInform"/>

    <FUNCTION id="fieldTotalDebit" name="SUM" format="euroInform">amtacctdr</FUNCTION>
    <FUNCTION id="fieldTotalCredit" name="SUM" format="euroInform">amtacctcr</FUNCTION>
    <FUNCTION id="fieldTotalBalance" name="SUM" format="euroInform">total</FUNCTION>

    <SUBREPORT id="reportTotals" name="reportTotals" report="org/openbravo/erpCommon/ad_reports/Totals"></SUBREPORT>
    <SUBREPORT id="reportAll" name="reportAll" report="org/openbravo/erpCommon/ad_reports/Totals"></SUBREPORT>

    <SUBREPORT id="reportC_ELEMENTVALUEFROM" name="reportC_ELEMENTVALUEFROM" report="org/openbravo/erpCommon/reference/List">
      <ARGUMENT name="parameterListSelected" withId="paramC_ELEMENTVALUE_IDFROM"/>
    </SUBREPORT>

    <SUBREPORT id="reportC_ELEMENTVALUETO" name="reportC_ELEMENTVALUETO" report="org/openbravo/erpCommon/reference/List">
      <ARGUMENT name="parameterListSelected" withId="paramC_ELEMENTVALUE_IDTO"/>
    </SUBREPORT>

    <SUBREPORT id="reportAD_ORGID" name="reportAD_ORGID" report="org/openbravo/erpCommon/reference/List">
      <ARGUMENT name="parameterListSelected" withId="paramAD_ORGID"/>
    </SUBREPORT>

    <SUBREPORT id="reportC_ACCTSCHEMA_ID" name="reportC_ACCTSCHEMA_ID" report="org/openbravo/erpCommon/reference/List">
      <ARGUMENT name="parameterListSelected" withId="paramC_ACCTSCHEMA_ID"/>
    </SUBREPORT>

    <SUBREPORT id="reportCBPartnerId_IN" name="reportCBPartnerId_IN" report="org/openbravo/erpCommon/reference/List">
      <ARGUMENT name="parameterListSelected" withId="paramVacio"/>
    </SUBREPORT>

    <SECTION id="sectionAmount" field="value"/>
    <SECTION id="sectionDetail"/>
  </structure>

  <structure name="structure2">
    <FIELD id="fieldRownum2">rownum</FIELD>
    <FUNCTION id="funcEvenOddRow2xx" name="MODULE" arg1="fieldRownum2" arg2="param2" format="integerEdition" attribute="class" replace="yy"/>
    <FIELD id="fieldValue2">value</FIELD>
    <FIELD id="fieldPartner2">partner</FIELD>
    <FIELD id="fieldDateacct2">dateacct</FIELD>
    <FIELD id="fieldName2">name</FIELD>
    <FIELD id="fieldDescription2">description</FIELD>
    <FIELD id="fieldAmtacctdr2" format="euroInform">amtacctdr</FIELD>
    <FIELD id="fieldAmtacctcr2" format="euroInform">amtacctcr</FIELD>
    <FIELD id="fieldTotal2">total</FIELD>
    <FIELD id="fieldSaldo2" attribute="value">saldo</FIELD>
    <FIELD id="fieldId2" attribute="onclick" replace="xx">factAcctGroupId</FIELD>
    <FUNCTION id="functionSumLine21" name="SUM" attribute="value">total</FUNCTION>
    <FUNCTION id="functionSumLine22" name="ADD" arg1="functionSumLine21" arg2="fieldSaldo2" format="euroInform"/>

    <FUNCTION id="fieldTotalDebit2" name="SUM" format="euroInform">amtacctdr</FUNCTION>
    <FUNCTION id="fieldTotalCredit2" name="SUM" format="euroInform">amtacctcr</FUNCTION>
    <FUNCTION id="fieldTotalBalance2" name="SUM" format="euroInform">total</FUNCTION>

    <SUBREPORT id="reportTotals2" name="reportTotals2" report="org/openbravo/erpCommon/ad_reports/Totals"></SUBREPORT>
    <SUBREPORT id="reportAll2" name="reportAll2" report="org/openbravo/erpCommon/ad_reports/Totals"></SUBREPORT>

    <!--PARAMETER id="functionSumLine22" name="ADD" default="prueba"/-->
    <SECTION id="sectionPartner" field="partner"/>
    <SECTION id="sectionAmount2" field="value"/>
    <SECTION id="sectionDetail2"/>
  </structure>
</REPORT>
